/*
 * Robot.h
 *
 *  Created on: 11 nov. 2012
 *      Author: guegan
 */

#ifndef ROBOT_H_
#define ROBOT_H_

#include <string>
#include "Objet.h"
#include "Obstacle.h"
#include "Position.h"
#include "RobotARepresenter.h"
#include "EtatRobot.h"

class EtatRobot;

class Robot : public RobotARepresenter{
private:
	string _direction;
	Position* _position;
	Obstacle* _obstacle;
	Objet* _objet;
	EtatRobot* _etat;
	EtatRobot* _etatPrecedent;
	string _ordre;

public:
	Robot(string direction, int x = 0, int y = 0);

	void avancer(int x, int y);
	void tourner(string direction);
	void saisir(Objet o);
	int peser();
	void poser();
	void rencontrerObstacle(Obstacle o);
	int evaluerObstacle();
	void figer();
	void repartir();

	void setEtatRobot(EtatRobot* e);
	EtatRobot* getEtatRobot(){ return _etat; };

	Obstacle* getObstacle(){ return _obstacle; };
	string getDirection(){ return _direction; };
	Objet* getObjet(){ return _objet; };
	Position* getPosition(){ return _position; };
	string getOrdre(){ return _ordre; };

	void setObstacle(Obstacle* o){ _obstacle = o; }
	void setDirection(string d){ _direction = d; }
	void setObjet(Objet* o){ _objet = o; }
	void setPosition(int x, int y){ _position = new Position(x,y); }

	~Robot();

};

#endif /* ROBOT_H_ */

